Skip to content

fix(examples-chat): collapse mode routes via UrlMatcher (unbreaks e2e + Vercel)#504

Merged
blove merged 1 commit into
mainfrom
claude/fix-routing-remount
May 21, 2026
Merged

fix(examples-chat): collapse mode routes via UrlMatcher (unbreaks e2e + Vercel)#504
blove merged 1 commit into
mainfrom
claude/fix-routing-remount

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 21, 2026

Summary

#500 broke examples/chat — e2e and Canonical demo → Vercel on main. Investigation:

Diagnosis: #500 added two route entries per mode (embed, embed/:threadId, etc — six entries total). Navigating from /embed to /embed/<id> is a route change (different entry), which makes Angular tear down + remount the mode component — killing any active stream.

Symptom: e2e test error-handling.spec.ts:5 and keyboard-accessibility.spec.ts:29 both depend on sending a message and seeing the assistant message render. After #500, the agent auto-creates a thread mid-send → signal→URL effect fires router.navigate('/embed/<new-id>') → component remounts → stream dies → assistant message never arrives → test fails.

Cascade: Canonical demo → Vercel gates on e2e green, so prod has been stuck on the pre-#500 bundle since merge.

Fix

Collapse the per-mode pair into one route entry via UrlMatcher. Both /<mode> and /<mode>/<threadId> now resolve to the same route, so the component instance survives the navigation and the stream keeps flowing.

Test plan

🤖 Generated with Claude Code

…omponent instance

PR #500 added a route entry per (mode, hasThreadId) — six entries total,
two per mode. Navigating from `/embed` to `/embed/<id>` was a route
CHANGE (different entry), which tore down EmbedMode and remounted it,
killing the active stream when the agent auto-created a thread mid-send.

Symptom: `examples/chat — e2e` test "failed stream surfaces an alert and
the next send recovers" + "core controls expose expected accessible names"
both fail because the assistant message never renders (stream died at
remount time). Vercel deploy gates on e2e, so prod has been stuck on the
pre-#500 bundle.

Fix: collapse the per-mode pair into a single route entry via UrlMatcher.
Both `/embed` and `/embed/<threadId>` now resolve to the same route, so
the component instance survives the navigation and the stream keeps
flowing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@blove blove enabled auto-merge (squash) May 21, 2026 04:51
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment May 21, 2026 4:56am

Request Review

@blove blove merged commit ffdccde into main May 21, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant